fd70c950c3e0f4c308bc3afd472a40fa98544d7b,src/test/java/org/seqdoop/hadoop_bam/TestBAMOutputFormat.java,TestBAMOutputFormat,testBAMRoundTrip,#,165
Before Change
outputPath = doMapReduce(outFile.getAbsolutePath());
// verify the final output
blockStreamFile = new File(new File(outputPath.toUri()), "part-m-00000");
final int actualCount = verifyBAMBlocks(
blockStreamFile,
samFileHeader,
After Change
Path outputPath = doMapReduce(testBAMFileName);
// merge the parts, and write to a temp file
final File outFile = File.createTempFile("testBAMWriter", ".bam");
outFile.deleteOnExit();
SAMFileMerger.mergeParts(outputPath.toUri().toString(), outFile.toURI().toString(),
SAMFormat.BAM, samFileHeader);
// now use the assembled output as m/r input
outputPath = doMapReduce(outFile.getAbsolutePath());
// merge the parts again
SAMFileMerger.mergeParts(outputPath.toUri().toString(), outFile.toURI().toString(),
SAMFormat.BAM, samFileHeader);
// verify the final output
final int actualCount = getBAMRecordCount(outFile);